package users.dawn.beans;

@SuppressWarnings("javadoc")
public class Config
{
	private String dateFormat;
	private String javaHome;
	private Integer maxCacheSize;
	private DatabaseParameters params;
	
	
	public Config(DatabaseParameters params, String dateFormat) 
	{
		this.params = params;
		this.dateFormat = dateFormat;
	}
	
	public Config(String javaHome, Integer maxCacheSize, DatabaseParameters params) 
	{
		this.javaHome = javaHome;
		this.maxCacheSize = maxCacheSize;
		this.params = params;
	}

	public DatabaseParameters getParams() {
		return params;
	}
	
	public String getDateFormat() {
		return dateFormat;
	}
	
	public String getJavaHome() {
		return javaHome;
	}

	public Integer getMaxCacheSize()  {
		return maxCacheSize;
	}
	
	public void setJavaHome(String javaHome) {
		this.javaHome = javaHome;
	}
	
	public void setMaxCacheSize(Integer maxCacheSize) {
		this.maxCacheSize = maxCacheSize;
	}
	
	public void myInit()
	{
		System.out.println("Config.myInit");
	}
	
	public void init()
	{
		System.out.println("Config.init");
	}
	
	public void destroy()
	{
		System.out.println("Config.destroy");
	}
	
	@Override
	public String toString() {
		return "MaxCacheSize = " + maxCacheSize 
				+ "\nJavaHome = " + javaHome
				+ "\nDateFormat = " + dateFormat
				+ "\nParams = " + params.toString();
	}
	
}
